/**
 * Created with IntelliJ IDEA.
 * User: skyline{http://my.oschina.net/skyline520}
 * Date: 12-11-25
 * Time: 下午1:06
 * To change this template use File | Settings | File Templates.
 */
Ext.define('Airways.view.system.user.PopUpPanel',{
    extend:'Ext.form.Panel',
    alias:'widget.userPopUpPanel',
    height:300,
    width:600,
    frame:true,
    header:false,
    bodyBorder:false,
    bodyStyle:'padding:20px 0px 0px 0px',
    defaults:{
        xtype:'textfield',
        labelAlign:'right',
        labelWidth:100,
        width:250
    },
    layout:{
        type:'table',
        columns:2
    },
    initComponent:function(){
        this.items = this.buildItems();
        this.callParent(arguments);
    },
    buildItems:function(){
         return [{
             fieldLabel:'登录号',
             afterLabelTextTpl: required,
             name:'userNo',
             maxLength:20,
             allowBlank:false
         },{
             name:'userName',
             afterLabelTextTpl: required,
             allowBlank:false,
             maxLength:50,
             fieldLabel:'中文名'
         },{
             itemId:'pass',
             name:'password',
             inputType: 'password',
             afterLabelTextTpl: required,
             fieldLabel:'密码',
             maxLength:50,
             allowBlank:false
         },{
             name:'confirmpassword',
             inputType: 'password',
             vtype:'password',
             fieldLabel:'确认密码',
             initialPassField: 'pass',
             maxLength:50,
             allowBlank:false
         },{
             name:'userPhone',
             vtype:'mobile',
             maxLength:20,
             fieldLabel:'办公电话'
         },{
             name:'userTel',
             vtype:'phone',
             maxLength:20,
             fieldLabel:'家庭电话'
         },{
             name:'userMobile',
             vtype:'mobile',
             maxLength:20,
             fieldLabel:'手机'
         },{
             name:'userQQ',
             vtype:'qq',
             maxLength:20,
             fieldLabel:'QQ'
         },{
             name:'userMsn',
             maxLength:100,
             fieldLabel:'MSN'
         },{
             name:'userMail',
             vtype:'email',
             maxLength:100,
             fieldLabel:'邮件'
         },{
             fieldLabel:'状态',
             xtype: 'radiogroup',
             columns: 2,
             colspan:2,
             vertical: true,
             items: [
                 {boxLabel: '启用', name: 'status',inputValue: '1',checked: true},
                 {boxLabel: '禁用', name: 'status',inputValue: '0'}
             ]
         },{
             name:'userRemark',
             xtype:'textareafield',
             width:500,
             colspan:2,
             maxLength:500,
             fieldLabel:'备注'
         },{
             name:'userId',
             hidden:true
         },{
             name:'version',
             hidden:true,
             value:0
         }];
    }
});
